# encoding=utf-8
def getsafedictvalue(dict,pathval,defval):
    childs = pathval.split("/")
    childdict = dict
    try:
        for child in childs:
            childdict = childdict[child]
        retval = childdict
    except Exception as e:
        retval = defval
        pass
    return retval
